#! /bin/bash

script_dir=$(cd "$(dirname "$0")"; pwd)

build_type=$1
echo $build_type
if [ -z "$build_type" ]; then
    build_type="Release"
fi
conan_cache_dir=${script_dir}/.conan
if [ ! -d "$conan_cache_dir" ] ;then
    mkdir ${conan_cache_dir}
fi


cp ${script_dir}/conanfile.txt ${conan_cache_dir}
cd ${conan_cache_dir}
conan install . -of=$build_type -b=missing -s build_type=$build_type -d direct_deploy